package com.example.ch04;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.widget.Toast;

public class Create_Datebase extends SQLiteOpenHelper{
    //创建数据库

        public Create_Datebase(Context context){
            super(context,"itcast.db",null,1);
        }
        @Override
        public void onCreate(SQLiteDatabase db) {
               db.execSQL("create table information(name varchar(20),sex varchar(5),phone varchar(20),workplace varchar(20),work varchar(10))");
//            _id int primary key autoincrement
        }

        @Override
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

        }

}
